-- GENERATED SPELL FOR [Ethereal Thief] --


function spell0_16544(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(30014,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16544', 564, 1)
end

function spell1_16544(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(30013,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16544', 8000, 1)
end

function spell2_16544(pUnit, Event) --@Spatial Distortion,Self--
pUnit:FullCastSpellOnTarget(29982,pUnit)
pUnit:RegisterEvent('Sorts_16544', 0, 1)
end

function Sorts_16544(pUnit, Event)
local choix_sorts_16544 = math.random(0, 2)
if choix_sorts_16544 == 0 then
pUnit:RegisterEvent('spell0_16544', 1, 1)
end
if choix_sorts_16544 == 1 then
pUnit:RegisterEvent('spell1_16544', 1, 1)
end
if choix_sorts_16544 == 2 then
pUnit:RegisterEvent('spell2_16544', 1, 1)
end
end

function mob16544_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16544', math.random(1500, 3000), 1)
end

function mob16544_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16544_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16544_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16544, 1, 'mob16544_Action')
RegisterUnitEvent(16544, 2, 'mob16544_Leave')
RegisterUnitEvent(16544, 3, 'mob16544_Kill')
RegisterUnitEvent(16544, 4, 'mob16544_Die')
